package com.yhjapp.onethingoneyard.onethingoneyard;

import android.app.KeyguardManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.PowerManager;

/**
 * Created by Administrator on 2018/2/27.
 */

public class BootBroadcastReceiver extends BroadcastReceiver {
    static final String ACTION = "android.intent.action.BOOT_COMPLETED";
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(ACTION)) {

            Intent bootIntent = context.getPackageManager().getLaunchIntentForPackage("com.yhjapp.onethingoneyard.onethingoneyard");
            context.startActivity(bootIntent);
        }
    }


}
